package cn.itcast.nems.studentrecord.web.util;

import cn.itcast.nems.studentrecord.dto.ReceivableAdjustmentDTO;
import cn.itcast.nems.studentrecord.dto.ReceivableAdjustmentQueryDTO;
import cn.itcast.nems.studentrecord.web.vo.form.ReceivableAdjustmentEditVO;
import cn.itcast.nems.studentrecord.web.vo.query.ReceivableAdjustmentQueryVO;
import org.springframework.beans.BeanUtils;
import org.springframework.lang.NonNull;

/**
 * 凭单WEB层工具类
 *
 * @author ChangLu.Gao
 * @version v1.0
 * @program nems-server
 * @description
 * @date 2023/11/22 17:57
 */
public class BusinessApprovalFormWebUtil {

    /**
     * 调价单查询条件转换
     * @author 高昌露
     * @since 2023/11/22 18:01
     * @param source 源数据
     * @return cn.itcast.nems.studentrecord.dto.ReceivableAdjustmentQueryDTO
     */
    public static ReceivableAdjustmentQueryDTO convert(@NonNull ReceivableAdjustmentQueryVO source) {
        ReceivableAdjustmentQueryDTO target = new ReceivableAdjustmentQueryDTO();
        BeanUtils.copyProperties(source, target);
        return target;
    }

    /**
     * 调价单编辑数据转换
     * @author 高昌露
     * @since 2023/11/23 16:47
     * @param source 源数据
     * @return cn.itcast.nems.studentrecord.dto.ReceivableAdjustmentDTO
     */
    public static ReceivableAdjustmentDTO convert(ReceivableAdjustmentEditVO source) {
        ReceivableAdjustmentDTO target = new ReceivableAdjustmentDTO();
        BeanUtils.copyProperties(source, target);
        return target;
    }


}
